﻿using Abp.Runtime.Validation;
using Mt.Site.Application.Dto;
using System;

namespace Mt.Site.Application.Modules.Dto
{
    public class PagedFrontendPageInput : PagedSortedAndFilteredInputDto, IShouldNormalize
    {
        public Guid? BackEndModuleId { get; set; }

        public PageType PageType { get; set; }

        public void Normalize()
        {
            switch (PageType)
            {
                case PageType.Special:
                    BackEndModuleId = Guid.Empty;
                    PageType = PageType.Menu;
                    break;
            }
        }
    }

    public enum PageType
    {
        Menu, 
        Detail, 
        Special
    }
}
